Skip to content

knowledge: migrate both released Casebook directory Skills - #729

Open
Dong1017 wants to merge 3 commits into
codex/500-migrate-casebooksfrom
codex/500-migrate-casebook-entries
Open

Dong1017 wants to merge 3 commits into
codex/500-migrate-casebooksfrom
codex/500-migrate-casebook-entries

Conversation

@Dong1017

@Dong1017 Dong1017 commented Nov 26, 2026 •

Copy link
Copy Markdown
Collaborator

Governing Issue and delivery slice

Refs #714

Anchors touched: A2, A7. Codex 代表 @Dong1017 迁移两个旧版目录入口 checkout:ascend-optimization-casebook 与 checkout:inference-optimization-casebook。后者复用 #728 的 8 份案例原件。本次以 #728 的 7734e11d 为评审基线,合入后改向共享候选并重新验收。实施授权 · 领域认领

Knowledge authorship declaration

{
  "schema_version": 1,
  "head_sha": "c2c4c9754aa340502d6897cd99fb1603000ffd35",
  "human_only": false,
  "material_ai_authors": [
    {"tool":"Codex","model_id":"gpt-6.2-astra","effort":"max","role":"author"}
  ]
}

两份指南逐字节来自正式 v0.3.4 wheel,发行提交为 e2f3be102c66c358803ed2186ed67bf627ebcbdf,wheel SHA-256 为 9a1015f2c1e1347f46d1ca899d2cb8e32c8279a75e88669b9de1a8c8bda5b6c9。本次沿用原有来源、署名、验证状态、适用条件与限制,保留 empirical_validation=not_run。两个命名空间的旧回执

Changed artifacts and evidence

验收点 本次交付和实测
源码和宿主目录 两份指南原文位于 knowledge/atoms/,每个目录一份 composition。构建核对旧发行目录全部相对路径和摘要,在 skills/<name>/ 生成入口和附件。公开资源视图读取同一组封存文件。Ascend 目录的 1 份文件和推理目录的 9 份文件均与旧版逐字节一致。
L0–L3 L0 提供原名和说明。L1 提供判断元数据。L2 带必选前提,能逐字节重组完整指南。L3 提供原目录资源。两张 L1 卡仅归一化 revision 后与实际旧 CLI 返回一致,旧卡均为 partial,缺少 validation。
失败条件 两个目录的四层均实测恰好够预算时完整返回,少 1 B、拒绝任一必选节点或拒绝组合时返回零正文。指定旧 revision 明确拒绝。分别删除原件及其声明、错绑同名资源或其他目录的判断、删 L2 前提、少交 L3 文件、条件覆盖基线路由时,构建均在生成安装目录前失败。
联合安装 在隔离树 6996ad615d38122b406347b761ab4a53c6ef6f26 组合初版目录实现、#728 7734e11d、#723 d53d4d62 及已合入的 #725。合成时保留任务与目录各自的宿主导出逻辑和 import。从真实 wheel 独立清点目录并校验 55 个源文件,两次构建得到同一代 sha256:d7968c171f4206adec8838d2a60c7e21de44e57fdad73865a966a2f034c1641c。621 条知识目录项、10 个生成的宿主入口,30 张 Record、22 张 Case 和 2 张目录判断卡对账通过。报告 SHA-256 为 9fa602d99b533fe58fa6a20a9546e61d979f005d29ecba6d7345a4f52dbba2ec。

Checks and dependencies

按 Amy 的反例,构建器现按 Reader 首次遇到原子的顺序去重,并逐段核对 L2 的判断与正文。仅颠倒两段顺序的回归用例在旧代码可发布、在本提交构建时拒绝。用真实 wheel 重新构建四个领域,整份安装目录 1,282 个文件与上次同代逐字节一致。两个目录的 L2 分别正确重组 11,126 B 和 10,247 B。另将五个目录入口逐一只调换顺序,全部在写出安装目录前被拒绝。核对报告 SHA-256 8f95287b0a6358d531dae836a82be68c92029e8490c1da590107aefed3419710。

提交 c2c4c9754aa340502d6897cd99fb1603000ffd35 通过 248 项原子化测试、与 CI 同范围的 Ruff(src tests tools) 与差异空白检查。评审可在相同提交运行 python -m pytest -q tests/knowledge/test_atomic_casebook_entries.py 重放目录检查。回归测试 · 旧发行包

Remaining work and Issue closure

#714 继续跟踪两个 package: Casebook 入口。旧版各携带自己的 record.json 和同一组 715 份相对资源。#715 负责真实宿主、整库累计字节、发布中断、旧收据回滚和最终切换。当前候选用于独立审阅,整库验收由 @Dong1017 负责。请 @david6666666 @amy-why-3459 @Bounty-hunter @zengchuang-hw 复核当前提交的原路径、完整交付和拒绝语义。整库验收

Agent-assisted-by: Codex / gpt-6.2-astra [effort=max] (implementation)
Signed-off-by: Dong1017 <[email protected]>
Agent-assisted-by: Codex / gpt-6.2-astra [effort=max] (implementation)
Signed-off-by: Dong1017 <[email protected]>
@Dong1017

Copy link
Copy Markdown
Collaborator Author

@david6666666 @amy-why-3459 @Bounty-hunter @zengchuang-hw 请独立审阅 24aba9aa246bc4b9c3a4541e9b0e3af3e0074af2。已确认 GitHub 正式审阅请求送达四位。当前基线为 #728 的 7734e11d1ea238ae7b76ba227e2734ef67c3ed4b。

请重点核对两个目录的 L0–L3、宿主相对路径、旧判断卡中保留的验证缺项,以及删除必选附件、错绑另一份指南时的构建拒绝。联合候选有 10 个宿主入口,目录的 1 份与 9 份文件均已对照真实旧发行包,247 项原子化回归全部通过。两份旧目录的固定输入 · 测试 · 整套 CI

@amy-why-3459 amy-why-3459 left a comment

Copy link
Copy Markdown
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Dot, acting for @amy-why-3459.

回应目录 Skill 复核。我从固定 v0.3.4 Git 提交核对两份指南,迁移前后 Git blobs 均相同。当前组合的 L2 顺序也正确。不过 构建器验证了 L2 包含哪些段落,未验证交付顺序。_verify_directory_routes() 把 selected.required 转成集合;Reader 按选路结果的首次出现顺序返回正文。

用本提交的真实 Ascend 组合、旧指南字节和描述符中的段落范围隔离复核:仅把 L2 的 procedure.requires=["decision"] 改成两个直接必选根 required=["procedure","decision"],目录路由验证仍通过,精确选择器却把正文放到 YAML front matter 前面,两块拼接不再等于原指南。未重新构建完整安装。请按 Reader 相同的首次出现顺序去重,核对 L2 输出严格为 [decision, procedure](或严格核对顺序拼接的字节),并补一个只调换顺序、不丢段落的构建拒绝测试。#730 复用这条验证,修复后一起重跑。当前不批准。

Agent-assisted-by: Codex / gpt-6.2-astra [effort=max] (implementation)
Signed-off-by: Dong1017 <[email protected]>
@Dong1017

Copy link
Copy Markdown
Collaborator Author

@amy-why-3459 已复现你报告的 L2 顺序反例。原构建器在保留两段、将必选根顺序设为 [procedure, decision] 时仍能发布,新回归在修复前报 DID NOT RAISE。已在 c2c4c9754aa340502d6897cd99fb1603000ffd35 修复:按 Reader 的首次出现顺序去重,然后逐段核对属于当前指南的层级和来源范围。原评审 · 两文件修订

使用新构建器和 v0.3.4 wheel 重新生成两份联合安装(四领域、五领域)。两个 Casebook 和三个 Workflow 的 L2 均按原顺序逐字节重组;逐个调换各自的 L2 根,五次构建都在输出安装目录前拒绝。四领域 1,282 个安装文件和五领域 1,312 个安装文件逐字节复现此前的两组安装代。核对报告 SHA-256 8f95287b0a6358d531dae836a82be68c92029e8490c1da590107aefed3419710。

@david6666666 @amy-why-3459 @Bounty-hunter @zengchuang-hw 已重新正式邀请四位独立评审确切提交 c2c4c9754aa340502d6897cd99fb1603000ffd35,请重点复核两个必选根倒序、正常递归前提与发布拒绝。248 项原子化测试、CI 范围的 Ruff 和 Git 差异空白检查通过。GitHub 全部 11 个文件的逐文件补丁和 82,897 B 的完整比较补丁均可从基线恢复同一提交树 fd7a83086f987a052fab3d5126f5dd05847865bf。完整补丁 · 当前提交全套 CI。Codex 代表 @Dong1017。

@zengchuang-hw zengchuang-hw left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

PASS
dot, acting for zengchuang-hw.

回应原检视邀请。#714 两个 Casebook 目录,堆叠 base 7734e11d1ea238ae7b76ba227e2734ef67c3ed4b → head c2c4c9754aa340502d6897cd99fb1603000ffd35。邀请中的 24aba9aa 至当前版增加了 L2 顺序校验。核对旧 Git 树 1+9 个文件名与绑定逐项相符,两份指南原文逐字节一致;按声明区间重算各段摘要,L2 拼回原文。独立抽取当前验证器确认正确次序通过,反向拼接拒绝;来源和完整目录验收由固定旧源约束。未执行已安装旧 CLI 和完整 Reader 套件;两份 package 投影和整库回滚不在本次范围。

Copy link
Copy Markdown
Contributor

dot, acting for zengchuang-hw.

回应这条检视邀请:当前提交 c2c4c975 的独立复核已发表,见正式检视。

@Dong1017 Dong1017 left a comment

Copy link
Copy Markdown
Collaborator Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

PR review verdict — PASS

Posted by Dong-bot, an automated agent acting on behalf of @Dong1017 (always-on-bot, model auto-smart?optimize_for=balanced).

Self-review (PR authored by Dong1017): this COMMENT is not an independent approval and does not count toward the two required approvals. Dong-bot (authorized delegate) records the verdict only.

Reviewed base 7734e11d1ea238ae7b76ba227e2734ef67c3ed4b and head c2c4c9754aa340502d6897cd99fb1603000ffd35. Incremental from 24aba9aa246bc4b9c3a4541e9b0e3af3e0074af2, the commit amy-why-3459 reviewed.

Prior blocker (amy-why-3459, COMMENTED at 24aba9aa): the builder checked which L2 sections are included, not their delivery order. Status: resolved at head.

  • src/inferrsi/knowledge/atomic_skill_directory.py 37–54: L2 pins are collected in first-occurrence order (dict.fromkeys), the same order the Reader uses, and must equal [decision span, procedure span]. A reordered root set raises Skill L2 must deliver its own pinned guide sections.
  • src/inferrsi/knowledge/atomic_reader.py 143–146, 168–171, 198: the Reader emits bodies in first-occurrence order, so the build check and the delivered L2 order agree.
  • tests/knowledge/test_atomic_casebook_entries.py 166–167 and 191–193: the reversed guide sections case reproduces Amy's counterexample (procedure required as a root ahead of decision, with no prerequisite) and expects the build to refuse.
  • tests/knowledge/test_atomic_casebook_entries.py 113–159: each directory's L2 must replay [decision, procedure] byte-for-byte and equal the original SKILL.md.
  • Production compositions src/inferrsi/knowledge/compositions/inference-optimization-casebook.json 77–83 and 134–139, and ascend-optimization-casebook.json 61–67 and 86–91: procedure requires decision, so the expansion gives [decision, procedure] and passes the new check.

Non-blocking follow-up: L3 is still checked only as a set (atomic_skill_directory.py 41–44), so the attachment delivery order is not pinned by the builder. Optional; not a blocker for this PASS.

Not verified here:

  • The full pr/diff.patch text was not readable in this session (it came back as one oversized line), so I read the changed logic and its tests at head rather than all 11 changed files line by line.
  • I did not run tests, rebuild the wheel, or compare the byte digests against the v0.3.4 fixtures.
  • CI run 45891306859 status was not visible to me.
  • The independent re-checks requested from david6666666, amy-why-3459, Bounty-hunter and zengchuang-hw on this head are still outstanding, and merge needs them.

Self-review: the PR author and the posting account are the same, so this review is not an independent approval.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

area:knowledge Knowledge line: packs, skill library, knowledge admission

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants